class SweetPotato:
    def __init__(self):
        self.cookeedString = "生的"
        self.cookeedLevel = 0

    def __str__(self):
        return f"地瓜状态{self.cookeedString}({self.cookeedLevel})"

    def cook(self, cooked_time):
        self.cookeedLevel += cooked_time
        if self.cookeedLevel >= 0 and self.cookeedLevel < 3:
            self.cookeedString = "生的"
        elif self.cookeedLevel > 3 and self.cookeedLevel < 5:
            self.cookeedString = "半生不熟"
        elif self.cookeedLevel > 5 and self.cookeedLevel < 8:
            self.cookeedString = "熟了"
        else:
            self.cookeedString = "烤糊了"


di_gua = SweetPotato()
di_gua.cook(1)
di_gua.cook(1)
di_gua.cook(1)
di_gua.cook(1)
di_gua.cook(1)
print(di_gua)

# 开始烤地瓜

